#ifndef WXSIMAGETREEPROPERTY_H
#define WXSIMAGETREEPROPERTY_H

#include "../../properties/wxscustomeditorproperty.h"

class wxsImageTreeProperty: public wxsCustomEditorProperty {
  public:

    wxsImageTreeProperty( const wxString& PGName, const wxString& DataName, const wxString& DataSubName, long Offset, int Priority = 100 );
    virtual const wxString GetTypeName() { return _T( "wxArrayString" ); }
    virtual bool ShowEditor( wxsPropertyContainer* Object );
  protected:
    virtual bool XmlRead( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool XmlWrite( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool PropStreamRead( wxsPropertyContainer* Object, wxsPropertyStream* Stream );
    virtual bool PropStreamWrite( wxsPropertyContainer* Object, wxsPropertyStream* Stream );
    virtual wxString GetStr( wxsPropertyContainer* Object );

  private:
    long Offset;
    wxString DataSubName;
    wxString DataName;
};

#define WXS_IMAGETREE(ClassName,VarName,PGName,DataName) \
  { static wxsImageTreeProperty _Property(PGName,DataName,_T("item"),wxsOFFSET(ClassName,VarName)); \
    Property(_Property); }

#define WXS_IMAGETREE_P(ClassName,VarName,PGName,DataName,Priority) \
  { static wxsImageTreeProperty _Property(PGName,DataName,_T("item"),wxsOFFSET(ClassName,VarName),Priority); \
    Property(_Property); }

#endif
